<?php

namespace addons\booking\command;

use think\console\Command;
use think\console\Input;
use think\console\Output;


class BookingSubscribe extends Command
{

    protected function configure()
    {
        $this->setName('booking:subscribe')->setDescription("booking 订阅消息推送");
    }

    /*
     * 消息推送---
     */
    protected function execute(Input $input, Output $output)
    {
        try {
            (new \addons\booking\model\TemplateMsg())->getSendHouseData();
        } catch (\Exception $e) {
            $output->writeln($e->getMessage());
        }

        $output->writeln("success");
    }
}
